#!/bin/bash
if ! ls ./*jpg?*; then echo "no images to detwitterize" && exit 1; fi
read -e -p "proceed detwitterization? " -r choice
[[ "$choice" == [Yy]* ]] && (echo "proceeding..."; for i in *jpg?*; do ls "$i"; mv "$i" "$(echo "$i" | sed -e "s/\?name=orig//")"; done)
